package bigmath;

import java.util.Calendar;

public class CalendarDemo {
    public static void main(String[] args) {
        //获取Calendar对象
        Calendar c = Calendar.getInstance();
        System.out.println(c);
        //指定日期
        Calendar c2 = Calendar.getInstance();
        c2.set(2022,5,1);
        System.out.println(c2);
        //获取是这个周的第几天
        int i = c.get(Calendar.DAY_OF_WEEK);
        System.out.println(i);
    }
}
